package com.huabo.contract.mysql.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author huabo
 * @since 2022-03-22
 */
@Data
  @EqualsAndHashCode(callSuper = false)
    @TableName("TBL_CONTRACT_SPNODE")
@ApiModel(value="TblContractSpnode对象", description="")
public class TblContractSpnodeMySql implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId("SPNODEID")
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
      private BigDecimal spnodeid;

    @TableField("NODEID")
    private BigDecimal nodeid;

    @TableField("STARTDATE")
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startdate;

    @TableField("ENDDATE")
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date enddate;

    @TableField("NODESTATUS")
    private String nodestatus;

    @TableField("NODEMEMO")
    private String nodememo;

    @TableField("NODECONTENT")
    private String nodecontent;

    @TableField("NODEMONEY")
    private BigDecimal nodemoney;

    @TableField("NODEFINISHDATE")
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date nodefinishdate;

    @TableField("NODEPLANFINISHDATE")
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date nodeplanfinishdate;

    @TableField("FORMID")
    private Long formid;

    @TableField("CONTRACTID")
    private BigDecimal contractid;//

    @TableField("NODEPOST")
    private String nodepost;//收款比例

    @TableField("ISWY")
    private String iswy; //是否违约

    @ApiModelProperty(value = "合同名称")
   @Transient
    private String contractname;

    @ApiModelProperty(value = "合同编号")
    @Transient
    private String contractno;
    @Transient//合同类型
    private String contracttype;
    @Transient
    private String recordtype;
    @Transient
    private BigDecimal flowid;
}
